Type.createNamespace('Coveo.CES.Web.Search.Scripts.Controls');
////////////////////////////////////////////////////////////////////////////////
// Coveo.CES.Web.Search.Scripts.Controls.FacetScript
Coveo.CES.Web.Search.Scripts.Controls.FacetScript = function Coveo_CES_Web_Search_Scripts_Controls_FacetScript() {
///
/// Client side code for the Facet control.
///
///
///
///
///
///
///
///
///
///
///
///
///
Coveo.CES.Web.Search.Scripts.Controls.FacetScript.constructBase(this);
}
Coveo.CES.Web.Search.Scripts.Controls.FacetScript.prototype = {
m_Main: null,
m_Header: null,
m_Popup: null,
m_Showing: false,
_m_HeaderClickDomEventHandler$1: null,
_m_OnClickElsewhereEvent$1: null,
initialize: function Coveo_CES_Web_Search_Scripts_Controls_FacetScript$initialize() {
Coveo.CNL.Web.Scripts.CNLAssert.notNull(this.m_Main);
Coveo.CNL.Web.Scripts.CNLAssert.notNull(this.m_Header);
this._m_HeaderClickDomEventHandler$1 = Delegate.create(this, this._header_Click$1);
this.m_Header.attachEvent('onclick', this._m_HeaderClickDomEventHandler$1);
if (this.m_Popup != null) {
this._m_OnClickElsewhereEvent$1 = new Coveo.CNL.Web.Scripts.OnClickElsewhereEvent([ this.m_Main ], Delegate.create(this, this._main_ClickElsewhere$1), true);
}
},
tearDown: function Coveo_CES_Web_Search_Scripts_Controls_FacetScript$tearDown() {
if (this._m_HeaderClickDomEventHandler$1 != null) {
this.m_Header.detachEvent('onclick', this._m_HeaderClickDomEventHandler$1);
this._m_HeaderClickDomEventHandler$1 = null;
}
if (this._m_OnClickElsewhereEvent$1 != null) {
this._m_OnClickElsewhereEvent$1.dispose();
this._m_OnClickElsewhereEvent$1 = null;
}
},
fillItems: function Coveo_CES_Web_Search_Scripts_Controls_FacetScript$fillItems(p_Callback) {
///
///
},
hideItems: function Coveo_CES_Web_Search_Scripts_Controls_FacetScript$hideItems(p_Callback) {
///
///
},
_fillItemsCallback$1: function Coveo_CES_Web_Search_Scripts_Controls_FacetScript$_fillItemsCallback$1(p_Return) {
///
/// Callback for when the server has filled the items.
///
///
///
this.m_Showing = true;
if (this.m_Popup != null) {
this.m_Popup.style.display = 'block';
Coveo.CNL.Web.Scripts.DOMUtilities.positionElement(this.m_Popup, this.m_Main, Coveo.CNL.Web.Scripts.PositionEnum.belowLeft);
this.m_Popup.style.visibility = 'visible';
}
},
_hideItemsCallback$1: function Coveo_CES_Web_Search_Scripts_Controls_FacetScript$_hideItemsCallback$1(p_Return) {
///
/// Callback for when the server has hidden the items.
///
///
///
this.m_Showing = false;
},
_header_Click$1: function Coveo_CES_Web_Search_Scripts_Controls_FacetScript$_header_Click$1() {
if (!this.m_Showing) {
if (this.m_Popup != null) {
this.m_Popup.style.visibility = 'hidden';
}
this.fillItems(Delegate.create(this, this._fillItemsCallback$1));
}
else if (this.m_Popup == null) {
this.hideItems(Delegate.create(this, this._hideItemsCallback$1));
}
},
_main_ClickElsewhere$1: function Coveo_CES_Web_Search_Scripts_Controls_FacetScript$_main_ClickElsewhere$1() {
Coveo.CNL.Web.Scripts.CNLAssert.check(this.m_Popup != null);
if (this.m_Showing) {
this.m_Showing = false;
this.m_Popup.style.display = 'none';
}
}
}
////////////////////////////////////////////////////////////////////////////////
// Coveo.CES.Web.Search.Scripts.Controls.ContextualDropDownScript
Coveo.CES.Web.Search.Scripts.Controls.ContextualDropDownScript = function Coveo_CES_Web_Search_Scripts_Controls_ContextualDropDownScript() {
///
/// Client side code for the ContextualDropDown control.
///
///
///
///
///
///
///
///
///
///
///
Coveo.CES.Web.Search.Scripts.Controls.ContextualDropDownScript.constructBase(this);
}
Coveo.CES.Web.Search.Scripts.Controls.ContextualDropDownScript.prototype = {
m_HotSpot: null,
m_DropDown: null,
m_IFrame: null,
_m_OnClickElsewhere$1: null,
_m_Showing$1: false,
initialize: function Coveo_CES_Web_Search_Scripts_Controls_ContextualDropDownScript$initialize() {
Coveo.CNL.Web.Scripts.CNLAssert.notNull(this.m_HotSpot);
Coveo.CNL.Web.Scripts.CNLAssert.notNull(this.m_DropDown);
if (Coveo.CNL.Web.Scripts.Browser.get_isIE6()) {
Coveo.CNL.Web.Scripts.CNLAssert.notNull(this.m_IFrame);
}
this.m_HotSpot.attachEvent('onclick', Delegate.create(this, this._hotSpot_Click$1));
this.m_DropDown.attachEvent('onclick', Delegate.create(this, this._dropDown_Click$1));
},
tearDown: function Coveo_CES_Web_Search_Scripts_Controls_ContextualDropDownScript$tearDown() {
this.m_HotSpot = null;
this.m_DropDown = null;
if (this._m_OnClickElsewhere$1 != null) {
this._m_OnClickElsewhere$1.dispose();
this._m_OnClickElsewhere$1 = null;
}
},
_hotSpot_Click$1: function Coveo_CES_Web_Search_Scripts_Controls_ContextualDropDownScript$_hotSpot_Click$1() {
if (!this._m_Showing$1) {
this.m_DropDown.style.position = 'absolute';
this.m_DropDown.style.zIndex = 999;
this.m_DropDown.style.display = 'block';
Coveo.CNL.Web.Scripts.DOMUtilities.positionElement(this.m_DropDown, this.m_HotSpot, Coveo.CNL.Web.Scripts.PositionEnum.belowLeft);
if (Coveo.CNL.Web.Scripts.Browser.get_isIE6()) {
this.m_IFrame.style.display = 'block';
Coveo.CNL.Web.Scripts.DOMUtilities.setElementSize(this.m_IFrame, Coveo.CNL.Web.Scripts.DOMUtilities.getElementSize(this.m_DropDown));
Coveo.CNL.Web.Scripts.DOMUtilities.positionElement(this.m_IFrame, this.m_HotSpot, Coveo.CNL.Web.Scripts.PositionEnum.belowLeft);
}
this._m_Showing$1 = true;
Coveo.CNL.Web.Scripts.CNLAssert.isNull(this._m_OnClickElsewhere$1);
this._m_OnClickElsewhere$1 = new Coveo.CNL.Web.Scripts.OnClickElsewhereEvent([ this.m_HotSpot, this.m_DropDown ], Delegate.create(this, this._document_ClickElsewhere$1), true);
}
else {
this._hideDropdown$1();
}
},
_dropDown_Click$1: function Coveo_CES_Web_Search_Scripts_Controls_ContextualDropDownScript$_dropDown_Click$1() {
this._hideDropdown$1();
},
_document_ClickElsewhere$1: function Coveo_CES_Web_Search_Scripts_Controls_ContextualDropDownScript$_document_ClickElsewhere$1() {
this._hideDropdown$1();
},
_hideDropdown$1: function Coveo_CES_Web_Search_Scripts_Controls_ContextualDropDownScript$_hideDropdown$1() {
///
/// Hides the dropdown.
///
if (this._m_Showing$1) {
Coveo.CNL.Web.Scripts.CNLAssert.notNull(this._m_OnClickElsewhere$1);
this.m_DropDown.style.display = 'none';
if (Coveo.CNL.Web.Scripts.Browser.get_isIE6()) {
this.m_IFrame.style.display = 'none';
}
this._m_OnClickElsewhere$1.dispose();
this._m_OnClickElsewhere$1 = null;
this._m_Showing$1 = false;
}
}
}
////////////////////////////////////////////////////////////////////////////////
// Coveo.CES.Web.Search.Scripts.Controls.SearchControlScript
Coveo.CES.Web.Search.Scripts.Controls.SearchControlScript = function Coveo_CES_Web_Search_Scripts_Controls_SearchControlScript() {
///
/// Client side code for the SearchControl control.
///
///
///
///
///
///
///
Coveo.CES.Web.Search.Scripts.Controls.SearchControlScript.constructBase(this);
}
Coveo.CES.Web.Search.Scripts.Controls.SearchControlScript.getInstance = function Coveo_CES_Web_Search_Scripts_Controls_SearchControlScript$getInstance(p_Id) {
///
/// Retrieves an instance of the associated
/// with a specific SearchControl object on the server side.
///
///
/// The UniqueID of the SearchControl.
///
///
Coveo.CNL.Web.Scripts.CNLAssert.notEmpty(p_Id);
var found = Coveo.CES.Web.Search.Scripts.Controls.SearchControlScript._s_Instances$1[p_Id];
Coveo.CNL.Web.Scripts.CNLAssert.notNull(found);
return found;
}
Coveo.CES.Web.Search.Scripts.Controls.SearchControlScript.tryOpeningOutlookUri = function Coveo_CES_Web_Search_Scripts_Controls_SearchControlScript$tryOpeningOutlookUri(p_Uri, p_OnSuccess, p_OnFailure) {
///
/// Tries opening an Outlook uri, and executes a piece of Javascript code
/// if it is detected that the proper protocol handler is not installed.
///
///
/// The outlook uri to open.
///
///
/// The JavaScript code to execute on success.
///
///
/// The JavaScript code to execute on failure.
///
Coveo.CNL.Web.Scripts.CNLAssert.notEmpty(p_Uri);
Coveo.CNL.Web.Scripts.CNLAssert.notEmpty(p_OnSuccess);
Coveo.CNL.Web.Scripts.CNLAssert.notEmpty(p_OnFailure);
Coveo.CNL.Web.Scripts.CNLAssert.check(Coveo.CNL.Web.Scripts.Browser.get_isIE());
var html = new StringBuilder();
html.appendLine('');
html.appendLine('
');
html.appendLine('');
html.appendLine('');
html.appendLine('');
html.appendLine('');
var wnd = window.open('about:blank', '_blank', 'width=150,height=150,left=0,top=0,toolbar=no,status=no,menubar=no,location=no');
var doc = wnd.document.open('text/html');
doc.write(html.toString());
doc.close();
Coveo.CES.Web.Search.Scripts.Controls.SearchControlScript._checkWindowStatus$1(wnd, p_OnSuccess, p_OnFailure, 20);
}
Coveo.CES.Web.Search.Scripts.Controls.SearchControlScript._checkWindowStatus$1 = function Coveo_CES_Web_Search_Scripts_Controls_SearchControlScript$_checkWindowStatus$1(p_Window, p_OnSuccess, p_OnFailure, p_CountDown) {
///
/// Checks the status of the window that is opening the outlook uri, and
/// take the appropriate action if a result can be determined. Otherwise,
/// arm a time to check the status again later.
///
///
/// The window that is opening the Outlook uri.
///
///
/// The JavaScript code to execute on success.
///
///
/// The JavaScript code to execute on failure.
///
///
/// Number of remaining attempts.
///
Coveo.CNL.Web.Scripts.CNLAssert.notNull(p_Window);
Coveo.CNL.Web.Scripts.CNLAssert.notEmpty(p_OnSuccess);
Coveo.CNL.Web.Scripts.CNLAssert.notEmpty(p_OnFailure);
if (p_CountDown === 0) {
p_Window.close();
}
if (Coveo.CES.Web.Search.Scripts.Controls.SearchControlScript._isWindowClosed$1(p_Window)) {
eval(p_OnSuccess);
}
else {
try {
var dummy = p_Window.location.href;
window.setTimeout(Delegate.create(null, function() {
Coveo.CES.Web.Search.Scripts.Controls.SearchControlScript._checkWindowStatus$1(p_Window, p_OnSuccess, p_OnFailure, p_CountDown - 1);
}), 100);
}
catch ($e1) {
if (Coveo.CES.Web.Search.Scripts.Controls.SearchControlScript._isWindowClosed$1(p_Window)) {
Coveo.CNL.Web.Scripts.CNLAssert.check(Coveo.CNL.Web.Scripts.Browser.get_isIE6());
eval(p_OnSuccess);
}
else {
p_Window.close();
eval(p_OnFailure);
}
}
}
}
Coveo.CES.Web.Search.Scripts.Controls.SearchControlScript._isWindowClosed$1 = function Coveo_CES_Web_Search_Scripts_Controls_SearchControlScript$_isWindowClosed$1(p_Window) {
///
/// Checks if a window is closed in a IE6 friendly way.
///
///
/// The window to check.
///
///
Coveo.CNL.Web.Scripts.CNLAssert.notNull(p_Window);
var closed;
try {
closed = p_Window.closed;
}
catch ($e1) {
closed = true;
}
return closed;
}
Coveo.CES.Web.Search.Scripts.Controls.SearchControlScript.prototype = {
m_Id: null,
m_Prefetch: null,
initialize: function Coveo_CES_Web_Search_Scripts_Controls_SearchControlScript$initialize() {
Coveo.CNL.Web.Scripts.CNLAssert.notEmpty(this.m_Id);
Coveo.CES.Web.Search.Scripts.Controls.SearchControlScript._s_Instances$1[this.m_Id] = this;
},
tearDown: function Coveo_CES_Web_Search_Scripts_Controls_SearchControlScript$tearDown() {
delete Coveo.CES.Web.Search.Scripts.Controls.SearchControlScript._s_Instances$1[this.m_Id];
},
startPrefetch: function Coveo_CES_Web_Search_Scripts_Controls_SearchControlScript$startPrefetch(p_Target, p_Argument) {
///
/// Starts a prefetching postback.
///
///
/// The postback target.
///
///
/// The postback argument.
///
Coveo.CNL.Web.Scripts.CNLAssert.notEmpty(p_Target);
Coveo.CNL.Web.Scripts.CNLAssert.notNull(p_Argument);
this.invalidatePendingPrefetch();
this.m_Prefetch = Coveo.CNL.Web.Scripts.Ajax.AjaxManagerScript.get_current().doPostBack(p_Target, p_Argument, true);
},
invalidatePendingPrefetch: function Coveo_CES_Web_Search_Scripts_Controls_SearchControlScript$invalidatePendingPrefetch() {
///
/// Invalidates any currently pending prefetch operation.
///
this.m_Prefetch = null;
},
usePrefetchResultsIfPossible: function Coveo_CES_Web_Search_Scripts_Controls_SearchControlScript$usePrefetchResultsIfPossible() {
///
/// Uses the results of the current prefetch operation, if any.
///
///
var used;
if (this.m_Prefetch != null) {
this.m_Prefetch.applyPreemptivePostback();
used = true;
}
else {
used = false;
}
return used;
}
}
////////////////////////////////////////////////////////////////////////////////
// Coveo.CES.Web.Search.Scripts.Controls.CloseModalBoxLinkScript
Coveo.CES.Web.Search.Scripts.Controls.CloseModalBoxLinkScript = function Coveo_CES_Web_Search_Scripts_Controls_CloseModalBoxLinkScript() {
///
/// Client side code for the CloseModalBoxLink control.
///
///
///
Coveo.CES.Web.Search.Scripts.Controls.CloseModalBoxLinkScript.constructBase(this);
}
Coveo.CES.Web.Search.Scripts.Controls.CloseModalBoxLinkScript.prototype = {
_m_OnKeyPressHandler$1: null,
initialize: function Coveo_CES_Web_Search_Scripts_Controls_CloseModalBoxLinkScript$initialize() {
this._m_OnKeyPressHandler$1 = Delegate.create(this, this._body_KeyPress$1);
document.attachEvent('onkeydown', this._m_OnKeyPressHandler$1);
},
tearDown: function Coveo_CES_Web_Search_Scripts_Controls_CloseModalBoxLinkScript$tearDown() {
document.detachEvent('onkeydown', this._m_OnKeyPressHandler$1);
},
closeModalBox: function Coveo_CES_Web_Search_Scripts_Controls_CloseModalBoxLinkScript$closeModalBox() {
///
/// Closes the modal box.
///
},
_body_KeyPress$1: function Coveo_CES_Web_Search_Scripts_Controls_CloseModalBoxLinkScript$_body_KeyPress$1() {
if (window.event.keyCode === 27) {
window.event.cancelBubble = true;
window.event.returnValue = false;
this.closeModalBox();
}
}
}
////////////////////////////////////////////////////////////////////////////////
// Coveo.CES.Web.Search.Scripts.Controls.SharePointSearchBoxScript
Coveo.CES.Web.Search.Scripts.Controls.SharePointSearchBoxScript = function Coveo_CES_Web_Search_Scripts_Controls_SharePointSearchBoxScript() {
///
/// Client side code for the SharePoint SearchBox control.
///
Coveo.CES.Web.Search.Scripts.Controls.SharePointSearchBoxScript.constructBase(this);
}
Coveo.CES.Web.Search.Scripts.Controls.SharePointSearchBoxScript.prototype = {
initialize: function Coveo_CES_Web_Search_Scripts_Controls_SharePointSearchBoxScript$initialize() {
var OurSearch = '{0}_layouts/CES/Search2007.aspx?q=\"{1}\"';
var s_MossPerson = new RegExp('(.+)Person\\.aspx.*');
var s_MossPeopleResults = new RegExp('https?://.+/PeopleResults\\.aspx\\?.*k=(\\w+:)?\"(.+)\"');
var person = s_MossPerson.exec(window.location.href);
if (person != null && person.length > 0) {
var elements = document.documentElement.getElementsByTagName('a');
for (var i = 0; i < elements.length; i++) {
var hrefAttribute = elements[i].attributes.getNamedItem('href');
var match = s_MossPeopleResults.exec(hrefAttribute.value);
if (match != null && match.length > 0) {
hrefAttribute.value = String.format(OurSearch, person[1], match[2]);
}
}
}
}
}
////////////////////////////////////////////////////////////////////////////////
// Coveo.CES.Web.Search.Scripts.Controls.SearchBoxScript
Coveo.CES.Web.Search.Scripts.Controls.SearchBoxScript = function Coveo_CES_Web_Search_Scripts_Controls_SearchBoxScript() {
///
/// Client side code for the SearchBox control.
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
/// The parameter for passing the query.
///
///
/// The parameter for passing the scope.
///
///
/// The parameter for passing the time zone offset.
///
Coveo.CES.Web.Search.Scripts.Controls.SearchBoxScript.constructBase(this);
}
Coveo.CES.Web.Search.Scripts.Controls.SearchBoxScript.prototype = {
m_Target: null,
m_SearchAsYouType: false,
m_TextBox: null,
m_SearchButton: null,
m_LinkButton: null,
m_ScopeDropDownList: null,
m_ShowDelay: 0,
m_HideDelay: 0,
m_Position: 0,
m_Popup: null,
m_IFrame: null,
_m_OnFocusHandler$1: null,
_m_OnBlurHandler$1: null,
_m_OnKeyPressHandler$1: null,
_m_SearchButtonClickEventHandler$1: null,
_m_LinkButtonClickEventHandler$1: null,
_m_PopupOnMouseOver$1: null,
_m_PopupOnMouseOut$1: null,
_m_UpdateTimeout$1: null,
_m_HideTimeout$1: null,
_m_HasFocus$1: false,
_m_OverResults$1: false,
initialize: function Coveo_CES_Web_Search_Scripts_Controls_SearchBoxScript$initialize() {
Coveo.CNL.Web.Scripts.CNLAssert.notNull(this.m_TextBox);
Coveo.CNL.Web.Scripts.CNLAssert.notNull(this.m_SearchButton);
this._m_OnKeyPressHandler$1 = Delegate.create(this, this._textBox_KeyPress$1);
this.m_TextBox.attachEvent('onkeydown', this._m_OnKeyPressHandler$1);
this._m_SearchButtonClickEventHandler$1 = Delegate.create(this, this._searchButton_Click$1);
this.m_SearchButton.attachEvent('onclick', this._m_SearchButtonClickEventHandler$1);
if (this.m_LinkButton != null) {
this._m_LinkButtonClickEventHandler$1 = Delegate.create(this, this._linkButton_Click$1);
this.m_LinkButton.attachEvent('onclick', this._m_LinkButtonClickEventHandler$1);
}
if (this.m_SearchAsYouType) {
if (Coveo.CNL.Web.Scripts.Browser.get_isIE6()) {
Coveo.CNL.Web.Scripts.CNLAssert.notNull(this.m_IFrame);
}
Coveo.CNL.Web.Scripts.CNLAssert.notNull(this.m_Popup);
this._m_OnFocusHandler$1 = Delegate.create(this, this._textBox_Focus$1);
this.m_TextBox.attachEvent('onfocus', this._m_OnFocusHandler$1);
this._m_OnBlurHandler$1 = Delegate.create(this, this._textBox_Blur$1);
this.m_TextBox.attachEvent('onblur', this._m_OnBlurHandler$1);
this._m_PopupOnMouseOver$1 = Delegate.create(this, this._popup_OnMouseOver$1);
this.m_Popup.attachEvent('onmouseover', this._m_PopupOnMouseOver$1);
this._m_PopupOnMouseOut$1 = Delegate.create(this, this._popup_OnMouseOut$1);
this.m_Popup.attachEvent('onmouseout', this._m_PopupOnMouseOut$1);
}
},
tearDown: function Coveo_CES_Web_Search_Scripts_Controls_SearchBoxScript$tearDown() {
if (this._m_OnFocusHandler$1 != null) {
this.m_TextBox.detachEvent('onfocus', this._m_OnFocusHandler$1);
}
if (this._m_OnBlurHandler$1 != null) {
this.m_TextBox.detachEvent('onblur', this._m_OnBlurHandler$1);
}
if (this._m_OnKeyPressHandler$1 != null) {
this.m_TextBox.detachEvent('onkeydown', this._m_OnKeyPressHandler$1);
}
if (this._m_SearchButtonClickEventHandler$1 != null) {
this.m_SearchButton.detachEvent('onclick', this._m_SearchButtonClickEventHandler$1);
}
if (this._m_LinkButtonClickEventHandler$1 != null) {
this.m_LinkButton.detachEvent('onclick', this._m_LinkButtonClickEventHandler$1);
}
},
serverUpdateResults: function Coveo_CES_Web_Search_Scripts_Controls_SearchBoxScript$serverUpdateResults(p_Query, p_Scope, p_Callback) {
///
///
///
///
///
///
},
_scheduleUpdateResults$1: function Coveo_CES_Web_Search_Scripts_Controls_SearchBoxScript$_scheduleUpdateResults$1() {
///
/// Schedules an update of the results.
///
this._cancelUpdateResults$1();
this._m_UpdateTimeout$1 = new Coveo.CNL.Web.Scripts.Timeout(Delegate.create(this, this._updateResults$1), this.m_ShowDelay);
},
_cancelUpdateResults$1: function Coveo_CES_Web_Search_Scripts_Controls_SearchBoxScript$_cancelUpdateResults$1() {
///
/// Cancels a scheduled update of the results.
///
if (this._m_UpdateTimeout$1 != null) {
this._m_UpdateTimeout$1.cancel();
this._m_UpdateTimeout$1 = null;
}
},
_updateResults$1: function Coveo_CES_Web_Search_Scripts_Controls_SearchBoxScript$_updateResults$1() {
///
/// Launches the server calls to update the results.
///
this._m_UpdateTimeout$1 = null;
if (this.m_TextBox.value !== '') {
if (this.m_ScopeDropDownList != null) {
this.serverUpdateResults(this.m_TextBox.value, this.m_ScopeDropDownList.value, Delegate.create(this, this._updateResultsCallback$1));
}
else {
this.serverUpdateResults(this.m_TextBox.value, '', Delegate.create(this, this._updateResultsCallback$1));
}
}
else {
this._hidePopup$1();
}
},
_updateResultsCallback$1: function Coveo_CES_Web_Search_Scripts_Controls_SearchBoxScript$_updateResultsCallback$1(p_Return) {
///
/// Callback for when the server has updated the results.
///
///
///
this._showPopup$1();
},
_showPopup$1: function Coveo_CES_Web_Search_Scripts_Controls_SearchBoxScript$_showPopup$1() {
///
/// Shows the popup containing quick results.
///
this.m_Popup.style.display = 'block';
Coveo.CNL.Web.Scripts.DOMUtilities.positionElement(this.m_Popup, this.m_TextBox, this.m_Position);
if (Coveo.CNL.Web.Scripts.Browser.get_isIE6()) {
this.m_IFrame.style.display = 'block';
Coveo.CNL.Web.Scripts.DOMUtilities.setElementSize(this.m_IFrame, Coveo.CNL.Web.Scripts.DOMUtilities.getElementSize(this.m_Popup));
Coveo.CNL.Web.Scripts.DOMUtilities.positionElement(this.m_IFrame, this.m_TextBox, this.m_Position);
}
},
_scheduleHidePopup$1: function Coveo_CES_Web_Search_Scripts_Controls_SearchBoxScript$_scheduleHidePopup$1() {
///
/// Schedules hiding the popup (when the user stops using the search box).
///
this._cancelHidePopup$1();
this._m_HideTimeout$1 = new Coveo.CNL.Web.Scripts.Timeout(Delegate.create(this, this._hidePopup$1), this.m_HideDelay);
},
_cancelHidePopup$1: function Coveo_CES_Web_Search_Scripts_Controls_SearchBoxScript$_cancelHidePopup$1() {
///
/// Cancels a scheduled hiding of the popup.
///
if (this._m_HideTimeout$1 != null) {
this._m_HideTimeout$1.cancel();
this._m_HideTimeout$1 = null;
}
},
_hidePopup$1: function Coveo_CES_Web_Search_Scripts_Controls_SearchBoxScript$_hidePopup$1() {
///
/// Hides the popup containing quick results.
///
this._cancelHidePopup$1();
this.m_Popup.style.display = 'none';
if (Coveo.CNL.Web.Scripts.Browser.get_isIE6()) {
this.m_IFrame.style.display = 'none';
}
},
_submitSearch$1: function Coveo_CES_Web_Search_Scripts_Controls_SearchBoxScript$_submitSearch$1() {
///
/// Submits the current search query.
///
var uri = this.m_Target;
uri += '&' + Coveo.CES.Web.Search.Scripts.Controls.SearchBoxScript.querY_PARAMETER + '=' + encodeURIComponent(this.m_TextBox.value);
if (this.m_ScopeDropDownList != null && this.m_ScopeDropDownList.value !== '') {
uri += '&' + Coveo.CES.Web.Search.Scripts.Controls.SearchBoxScript.initiaL_SCOPE_PARAMETER + '=' + encodeURIComponent(this.m_ScopeDropDownList.value);
}
uri += '&' + Coveo.CES.Web.Search.Scripts.Controls.SearchBoxScript.timE_ZONE_OFFSET_PARAMETER + '=' + eval('-new Date().getTimezoneOffset()');
window.navigate(uri);
},
_textBox_Focus$1: function Coveo_CES_Web_Search_Scripts_Controls_SearchBoxScript$_textBox_Focus$1() {
this._cancelHidePopup$1();
this._m_HasFocus$1 = true;
if (this.m_TextBox.value !== '') {
this._scheduleUpdateResults$1();
}
},
_textBox_Blur$1: function Coveo_CES_Web_Search_Scripts_Controls_SearchBoxScript$_textBox_Blur$1() {
if (!this._m_OverResults$1) {
this._scheduleHidePopup$1();
}
this._cancelUpdateResults$1();
this._m_HasFocus$1 = false;
},
_textBox_KeyPress$1: function Coveo_CES_Web_Search_Scripts_Controls_SearchBoxScript$_textBox_KeyPress$1() {
if (window.event.keyCode === 13) {
this._submitSearch$1();
window.event.returnValue = false;
}
else if (this.m_SearchAsYouType) {
this._scheduleUpdateResults$1();
}
},
_searchButton_Click$1: function Coveo_CES_Web_Search_Scripts_Controls_SearchBoxScript$_searchButton_Click$1() {
this._submitSearch$1();
},
_linkButton_Click$1: function Coveo_CES_Web_Search_Scripts_Controls_SearchBoxScript$_linkButton_Click$1() {
window.navigate(this.m_Target);
},
_popup_OnMouseOver$1: function Coveo_CES_Web_Search_Scripts_Controls_SearchBoxScript$_popup_OnMouseOver$1() {
this._m_OverResults$1 = true;
this._cancelHidePopup$1();
},
_popup_OnMouseOut$1: function Coveo_CES_Web_Search_Scripts_Controls_SearchBoxScript$_popup_OnMouseOut$1() {
if (!this._m_HasFocus$1) {
this._scheduleHidePopup$1();
}
this._m_OverResults$1 = false;
}
}
////////////////////////////////////////////////////////////////////////////////
// Coveo.CES.Web.Search.Scripts.Controls.PrefetchTermScript
Coveo.CES.Web.Search.Scripts.Controls.PrefetchTermScript = function Coveo_CES_Web_Search_Scripts_Controls_PrefetchTermScript() {
///
/// Client side code for a control who prefetchs query terms.
///
///
///
///
///
///
///
///
///
///
///
Coveo.CES.Web.Search.Scripts.Controls.PrefetchTermScript.constructBase(this);
}
Coveo.CES.Web.Search.Scripts.Controls.PrefetchTermScript.prototype = {
m_Id: null,
m_TextBox: null,
m_PrefetchTimeout: null,
initialize: function Coveo_CES_Web_Search_Scripts_Controls_PrefetchTermScript$initialize() {
Coveo.CNL.Web.Scripts.CNLAssert.notEmpty(this.m_Id);
Coveo.CNL.Web.Scripts.CNLAssert.notNull(this.m_TextBox);
this.m_TextBox.attachEvent('onkeyup', Delegate.create(this, this._textBox_KeyUp$1));
this.m_TextBox.attachEvent('onblur', Delegate.create(this, this._textBox_LostFocus$1));
},
tearDown: function Coveo_CES_Web_Search_Scripts_Controls_PrefetchTermScript$tearDown() {
this.m_TextBox = null;
},
prefetchTerms: function Coveo_CES_Web_Search_Scripts_Controls_PrefetchTermScript$prefetchTerms(p_Terms, p_Callback) {
///
///
///
///
},
_textBox_KeyUp$1: function Coveo_CES_Web_Search_Scripts_Controls_PrefetchTermScript$_textBox_KeyUp$1() {
this._cancelPendingPrefetch$1();
if (window.event.keyCode === 32) {
this._startPrefetch$1();
}
else if (window.event.keyCode !== 13) {
this._schedulePrefetch$1();
}
},
_textBox_LostFocus$1: function Coveo_CES_Web_Search_Scripts_Controls_PrefetchTermScript$_textBox_LostFocus$1() {
this._cancelPendingPrefetch$1();
},
_schedulePrefetch$1: function Coveo_CES_Web_Search_Scripts_Controls_PrefetchTermScript$_schedulePrefetch$1() {
///
/// Schedules a prefetch.
///
Coveo.CNL.Web.Scripts.CNLAssert.isNull(this.m_PrefetchTimeout);
this.m_PrefetchTimeout = new Coveo.CNL.Web.Scripts.Timeout(Delegate.create(this, this._startPrefetch$1), Coveo.CES.Web.Search.Scripts.Controls.PrefetchTermScript._prefetcH_DELAY$1);
},
_cancelPendingPrefetch$1: function Coveo_CES_Web_Search_Scripts_Controls_PrefetchTermScript$_cancelPendingPrefetch$1() {
///
/// Cancels any pending prefetch.
///
if (this.m_PrefetchTimeout != null) {
this.m_PrefetchTimeout.cancel();
this.m_PrefetchTimeout = null;
}
},
_startPrefetch$1: function Coveo_CES_Web_Search_Scripts_Controls_PrefetchTermScript$_startPrefetch$1() {
///
/// Launches a terms prefetch on the server.
///
this.m_PrefetchTimeout = null;
if (this.m_TextBox != null) {
if (this.m_TextBox.value !== '') {
var terms = this.m_TextBox.value.split(' ');
var newTerms = '';
for (var i = 0; i < terms.length; i++) {
if (terms[i] !== '') {
if (!Coveo.CES.Web.Search.Scripts.Controls.PrefetchTermScript._s_PrefetchedTerms$1.contains(terms[i])) {
Coveo.CES.Web.Search.Scripts.Controls.PrefetchTermScript._s_PrefetchedTerms$1.add(terms[i]);
if (newTerms.length !== 0) {
newTerms += ' ';
}
newTerms += terms[i];
}
}
}
if (newTerms.length !== 0) {
this.prefetchTerms(newTerms, Delegate.create(this, this._prefetchTermsCallback$1));
}
}
}
},
_prefetchTermsCallback$1: function Coveo_CES_Web_Search_Scripts_Controls_PrefetchTermScript$_prefetchTermsCallback$1(p_Return) {
///
/// Callback for when the server has prefetched the terms.
///
///
/// The return of the call to the server.
///
}
}
////////////////////////////////////////////////////////////////////////////////
// Coveo.CES.Web.Search.Scripts.Controls.QueryScript
Coveo.CES.Web.Search.Scripts.Controls.QueryScript = function Coveo_CES_Web_Search_Scripts_Controls_QueryScript() {
///
/// Client side code for the Query control.
///
///
///
///
///
///
///
///
///
///
///
///
///
Coveo.CES.Web.Search.Scripts.Controls.QueryScript.constructBase(this);
}
Coveo.CES.Web.Search.Scripts.Controls.QueryScript.prototype = {
m_Id: null,
m_TextBox: null,
m_SearchControlId: null,
m_SearchObject: null,
m_PrefetchTimeout: null,
initialize: function Coveo_CES_Web_Search_Scripts_Controls_QueryScript$initialize() {
Coveo.CNL.Web.Scripts.CNLAssert.notEmpty(this.m_Id);
Coveo.CNL.Web.Scripts.CNLAssert.notNull(this.m_TextBox);
this.m_TextBox.attachEvent('onkeydown', Delegate.create(this, this._textBox_KeyPress$1));
Coveo.CNL.Web.Scripts.CNLAssert.notEmpty(this.m_SearchControlId);
this.m_SearchObject = Coveo.CES.Web.Search.Scripts.Controls.SearchControlScript.getInstance(this.m_SearchControlId);
},
tearDown: function Coveo_CES_Web_Search_Scripts_Controls_QueryScript$tearDown() {
this.m_TextBox = null;
this.m_SearchObject = null;
},
_textBox_KeyPress$1: function Coveo_CES_Web_Search_Scripts_Controls_QueryScript$_textBox_KeyPress$1() {
this._cancelPendingPrefetch$1();
if (window.event.keyCode === 13) {
if (this.m_SearchObject.usePrefetchResultsIfPossible()) {
window.event.returnValue = false;
}
}
else {
this.m_SearchObject.invalidatePendingPrefetch();
this._schedulePrefetch$1();
}
},
_schedulePrefetch$1: function Coveo_CES_Web_Search_Scripts_Controls_QueryScript$_schedulePrefetch$1() {
///
/// Schedules a prefetch.
///
Coveo.CNL.Web.Scripts.CNLAssert.isNull(this.m_PrefetchTimeout);
this.m_PrefetchTimeout = new Coveo.CNL.Web.Scripts.Timeout(Delegate.create(this, this._startPrefetch$1), Coveo.CES.Web.Search.Scripts.Controls.QueryScript._prefetcH_DELAY$1);
},
_cancelPendingPrefetch$1: function Coveo_CES_Web_Search_Scripts_Controls_QueryScript$_cancelPendingPrefetch$1() {
///
/// Cancels any pending prefetch.
///
if (this.m_PrefetchTimeout != null) {
this.m_PrefetchTimeout.cancel();
this.m_PrefetchTimeout = null;
}
},
_startPrefetch$1: function Coveo_CES_Web_Search_Scripts_Controls_QueryScript$_startPrefetch$1() {
///
/// Launches a prefetch on the server.
///
this.m_PrefetchTimeout = null;
if (this.m_TextBox.value !== '') {
this.m_SearchObject.startPrefetch(this.m_Id, '');
}
}
}
////////////////////////////////////////////////////////////////////////////////
// Coveo.CES.Web.Search.Scripts.Controls.HighlightedQueryScript
Coveo.CES.Web.Search.Scripts.Controls.HighlightedQueryScript = function Coveo_CES_Web_Search_Scripts_Controls_HighlightedQueryScript() {
///
/// Client side code for the HighlightedQuery control.
///
///
///
///
///
///
/// The term control to attach the mouse events to.
///
///
/// The index of the term.
///
///
/// The name of the frame that contains the terms to iterate.
///
Coveo.CES.Web.Search.Scripts.Controls.HighlightedQueryScript.constructBase(this);
}
Coveo.CES.Web.Search.Scripts.Controls.HighlightedQueryScript.prototype = {
_m_MouseDownEventHandler$1: null,
_m_MouseWheelEventHandler$1: null,
m_Term: null,
m_Index: 0,
m_FrameName: null,
initialize: function Coveo_CES_Web_Search_Scripts_Controls_HighlightedQueryScript$initialize() {
Coveo.CNL.Web.Scripts.CNLAssert.notNull(this.m_Term);
Coveo.CNL.Web.Scripts.CNLAssert.notEmpty(this.m_FrameName);
this._m_MouseDownEventHandler$1 = Delegate.create(this, this._term_MouseDown$1);
this._m_MouseWheelEventHandler$1 = Delegate.create(this, this._term_MouseWheel$1);
this.m_Term.attachEvent('onmousedown', this._m_MouseDownEventHandler$1);
this.m_Term.attachEvent('xxDOMMouseScroll', this._m_MouseWheelEventHandler$1);
this.m_Term.attachEvent('onmousewheel', this._m_MouseWheelEventHandler$1);
},
tearDown: function Coveo_CES_Web_Search_Scripts_Controls_HighlightedQueryScript$tearDown() {
if (this.m_Term != null) {
if (this._m_MouseDownEventHandler$1 != null) {
this.m_Term.detachEvent('onmousedown', this._m_MouseDownEventHandler$1);
}
if (this._m_MouseWheelEventHandler$1 != null) {
this.m_Term.detachEvent('xxDOMMouseScroll', this._m_MouseWheelEventHandler$1);
this.m_Term.detachEvent('onmousewheel', this._m_MouseWheelEventHandler$1);
}
this.m_Term = null;
}
},
_term_MouseDown$1: function Coveo_CES_Web_Search_Scripts_Controls_HighlightedQueryScript$_term_MouseDown$1() {
this._highlightNextOccurence$1();
window.event.returnValue = false;
},
_term_MouseWheel$1: function Coveo_CES_Web_Search_Scripts_Controls_HighlightedQueryScript$_term_MouseWheel$1() {
if (this._getMouseWheelDelta$1() < 0) {
this._highlightNextOccurence$1();
}
else {
this._highlightPreviousOccurence$1();
}
window.event.cancelBubble = true;
window.event.returnValue = false;
},
_getMouseWheelDelta$1: function Coveo_CES_Web_Search_Scripts_Controls_HighlightedQueryScript$_getMouseWheelDelta$1() {
///
/// Get the mouse wheel delta for the current event.
///
///
var wheelDelta = 0;
if (Coveo.CNL.Web.Scripts.Browser.get_isFirefox()) {
wheelDelta = (eval('event.detail')) * -1;
}
else {
wheelDelta = eval('window.event.wheelDelta');
}
return wheelDelta;
},
_highlightNextOccurence$1: function Coveo_CES_Web_Search_Scripts_Controls_HighlightedQueryScript$_highlightNextOccurence$1() {
///
/// Highlights the next occurrence of a term.
///
var frame = document.getElementsByName(this.m_FrameName)[0];
if (frame != null) {
frame.HighlightNextOccurence(this.m_Index);
}
},
_highlightPreviousOccurence$1: function Coveo_CES_Web_Search_Scripts_Controls_HighlightedQueryScript$_highlightPreviousOccurence$1() {
///
/// Highlights the previous occurrence of a term.
///
var frame = document.getElementsByName(this.m_FrameName)[0];
if (frame != null) {
frame.HighlightPreviousOccurence(this.m_Index);
}
}
}
////////////////////////////////////////////////////////////////////////////////
// Coveo.CES.Web.Search.Scripts.Controls.ResultPrintableUriScript
Coveo.CES.Web.Search.Scripts.Controls.ResultPrintableUriScript = function Coveo_CES_Web_Search_Scripts_Controls_ResultPrintableUriScript() {
///
/// Client side code for the ResultPrintableUri control.
///
///
///
///
///
///
///
Coveo.CES.Web.Search.Scripts.Controls.ResultPrintableUriScript.constructBase(this);
}
Coveo.CES.Web.Search.Scripts.Controls.ResultPrintableUriScript.prototype = {
m_RemovedParentsTag: null,
m_ReplacementStringTag: null,
_m_OnClickHandler$1: null,
initialize: function Coveo_CES_Web_Search_Scripts_Controls_ResultPrintableUriScript$initialize() {
Coveo.CNL.Web.Scripts.CNLAssert.notNull(this.m_RemovedParentsTag);
Coveo.CNL.Web.Scripts.CNLAssert.notNull(this.m_ReplacementStringTag);
this._m_OnClickHandler$1 = Delegate.create(this, this.shortenedUri_Click);
this.m_ReplacementStringTag.attachEvent('onclick', this._m_OnClickHandler$1);
},
tearDown: function Coveo_CES_Web_Search_Scripts_Controls_ResultPrintableUriScript$tearDown() {
if (this._m_OnClickHandler$1 != null) {
this.m_ReplacementStringTag.detachEvent('onclick', this._m_OnClickHandler$1);
}
},
shortenedUri_Click: function Coveo_CES_Web_Search_Scripts_Controls_ResultPrintableUriScript$shortenedUri_Click() {
this.m_ReplacementStringTag.style.display = 'none';
this.m_RemovedParentsTag.style.display = '';
}
}
////////////////////////////////////////////////////////////////////////////////
// Coveo.CES.Web.Search.Scripts.Controls.ViewAsHtmlPanelScript
Coveo.CES.Web.Search.Scripts.Controls.ViewAsHtmlPanelScript = function Coveo_CES_Web_Search_Scripts_Controls_ViewAsHtmlPanelScript() {
///
/// Client side code for the ViewAsHtmlPanel control.
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
Coveo.CES.Web.Search.Scripts.Controls.ViewAsHtmlPanelScript.constructBase(this);
}
Coveo.CES.Web.Search.Scripts.Controls.ViewAsHtmlPanelScript.prototype = {
_m_BackupDocumentMargin$1: null,
_m_BackupDocumentPadding$1: null,
_m_BackupDocumentHeight$1: null,
_m_BackupDocumentOverflow$1: null,
_m_BackupBodyMargin$1: null,
_m_BackupBodyPadding$1: null,
_m_BackupBodyHeight$1: null,
_m_BackupBodyOverflow$1: null,
initialize: function Coveo_CES_Web_Search_Scripts_Controls_ViewAsHtmlPanelScript$initialize() {
this._m_BackupDocumentMargin$1 = document.documentElement.style.margin;
document.documentElement.style.margin = '0px';
this._m_BackupDocumentPadding$1 = document.documentElement.style.padding;
document.documentElement.style.padding = '0px';
this._m_BackupDocumentHeight$1 = document.documentElement.style.height;
document.documentElement.style.height = '100%';
this._m_BackupDocumentOverflow$1 = document.documentElement.style.overflow;
document.documentElement.style.overflow = 'hidden';
this._m_BackupBodyMargin$1 = document.body.style.margin;
document.body.style.margin = '0px';
this._m_BackupBodyPadding$1 = document.body.style.padding;
document.body.style.padding = '0px';
this._m_BackupBodyHeight$1 = document.body.style.height;
document.body.style.height = '100%';
this._m_BackupBodyOverflow$1 = document.body.style.overflow;
document.body.style.overflow = 'hidden';
},
tearDown: function Coveo_CES_Web_Search_Scripts_Controls_ViewAsHtmlPanelScript$tearDown() {
document.documentElement.style.margin = this._m_BackupDocumentMargin$1;
document.documentElement.style.padding = this._m_BackupDocumentPadding$1;
document.documentElement.style.height = this._m_BackupDocumentHeight$1;
document.documentElement.style.overflow = this._m_BackupDocumentOverflow$1;
document.body.style.margin = this._m_BackupBodyMargin$1;
document.body.style.padding = this._m_BackupBodyPadding$1;
document.body.style.height = this._m_BackupBodyHeight$1;
document.body.style.overflow = this._m_BackupBodyOverflow$1;
}
}
Type.createNamespace('Coveo.CES.Web.Search.Scripts.Controls.Results');
////////////////////////////////////////////////////////////////////////////////
// Coveo.CES.Web.Search.Scripts.Controls.Results.SilverlightPlayPauseButtonMode
Coveo.CES.Web.Search.Scripts.Controls.Results.SilverlightPlayPauseButtonMode = function() {
///
/// Possible states for a .
///
///
/// Play
///
///
/// Pause
///
};
Coveo.CES.Web.Search.Scripts.Controls.Results.SilverlightPlayPauseButtonMode.prototype = {
play: 0,
pause: 1
}
Coveo.CES.Web.Search.Scripts.Controls.Results.SilverlightPlayPauseButtonMode.createEnum('Coveo.CES.Web.Search.Scripts.Controls.Results.SilverlightPlayPauseButtonMode', false);
////////////////////////////////////////////////////////////////////////////////
// Coveo.CES.Web.Search.Scripts.Controls.Results.SilverlightProgressOrientation
Coveo.CES.Web.Search.Scripts.Controls.Results.SilverlightProgressOrientation = function() {
///
/// Possible values for a orientation.
///
///
/// Progress will be rendered from left to right
///
///
/// Progress will be rendered from top to bottom
///
};
Coveo.CES.Web.Search.Scripts.Controls.Results.SilverlightProgressOrientation.prototype = {
horizontal: 0,
vertical: 1
}
Coveo.CES.Web.Search.Scripts.Controls.Results.SilverlightProgressOrientation.createEnum('Coveo.CES.Web.Search.Scripts.Controls.Results.SilverlightProgressOrientation', false);
////////////////////////////////////////////////////////////////////////////////
// Coveo.CES.Web.Search.Scripts.Controls.Results.SilverlightButtonState
Coveo.CES.Web.Search.Scripts.Controls.Results.SilverlightButtonState = function() {
///
/// Defines the different possibles states of a
/// .
///
///
/// Disabled
///
///
/// Enabled
///
///
/// Grayed
///
};
Coveo.CES.Web.Search.Scripts.Controls.Results.SilverlightButtonState.prototype = {
disabled: 0,
enabled: 1,
grayed: 2
}
Coveo.CES.Web.Search.Scripts.Controls.Results.SilverlightButtonState.createEnum('Coveo.CES.Web.Search.Scripts.Controls.Results.SilverlightButtonState', false);
////////////////////////////////////////////////////////////////////////////////
// Coveo.CES.Web.Search.Scripts.Controls.Results.ZoomDirection
Coveo.CES.Web.Search.Scripts.Controls.Results.ZoomDirection = function() {
///
/// Zooming direction possible values.
///
///
/// Zoom In
///
///
/// Zoom Out
///
};
Coveo.CES.Web.Search.Scripts.Controls.Results.ZoomDirection.prototype = {
zoomIn: 0,
zoomOut: 1
}
Coveo.CES.Web.Search.Scripts.Controls.Results.ZoomDirection.createEnum('Coveo.CES.Web.Search.Scripts.Controls.Results.ZoomDirection', false);
////////////////////////////////////////////////////////////////////////////////
// Coveo.CES.Web.Search.Scripts.Controls.Results.SilverlightUtteranceTextEntry
Coveo.CES.Web.Search.Scripts.Controls.Results.SilverlightUtteranceTextEntry = function Coveo_CES_Web_Search_Scripts_Controls_Results_SilverlightUtteranceTextEntry(p_TargetControl) {
///
/// This class renders a within a .
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
Coveo.CES.Web.Search.Scripts.Controls.Results.SilverlightUtteranceTextEntry.constructBase(this, [ p_TargetControl ]);
}
Coveo.CES.Web.Search.Scripts.Controls.Results.SilverlightUtteranceTextEntry.prototype = {
_m_TextBlock$2: null,
_m_TextContainer$2: null,
get_width: function Coveo_CES_Web_Search_Scripts_Controls_Results_SilverlightUtteranceTextEntry$get_width() {
///
return Coveo.CES.Web.Search.Scripts.Controls.Results.SilverlightUtteranceTextEntry.callBase(this, 'get_width');
},
set_width: function Coveo_CES_Web_Search_Scripts_Controls_Results_SilverlightUtteranceTextEntry$set_width(value) {
///
Coveo.CES.Web.Search.Scripts.Controls.Results.SilverlightUtteranceTextEntry.callBase(this, 'set_width', [ value ]);
this.set_text(this.get_text());
return value;
},
tearDown: function Coveo_CES_Web_Search_Scripts_Controls_Results_SilverlightUtteranceTextEntry$tearDown() {
this._m_TextBlock$2 = null;
this._m_TextContainer$2 = null;
Coveo.CES.Web.Search.Scripts.Controls.Results.SilverlightUtteranceTextEntry.callBase(this, 'tearDown');
},
highlight: function Coveo_CES_Web_Search_Scripts_Controls_Results_SilverlightUtteranceTextEntry$highlight() {
(this._m_TextBlock$2.foreground).color = Coveo.CES.Web.Search.Scripts.Controls.Results.SilverlightUtteranceTextEntry._mousE_ENTER_TEXT_COLOR$2;
},
undoHighlight: function Coveo_CES_Web_Search_Scripts_Controls_Results_SilverlightUtteranceTextEntry$undoHighlight() {
this.renderControl();
},
buildTextControl: function Coveo_CES_Web_Search_Scripts_Controls_Results_SilverlightUtteranceTextEntry$buildTextControl() {
(this.m_TargetControl).children.clear();
var utt = this.get_data();
var datetime = new Date(0, 0, 0, 0, 0, Math.truncate(utt.get_start()));
var time = datetime.getHours().toString().padLeft(2, '0') + ':' + datetime.getMinutes().toString().padLeft(2, '0') + ':' + datetime.getSeconds().toString().padLeft(2, '0');
var targetWidth = this.m_TargetControl.width - 2;
var containerXaml = '